package com.example.demo.generation.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.example.demo.generation.entity.Columns;

@Mapper
public interface ColumnsMapper extends BaseMapper<Columns>{
	   @Select("select * from INFORMATION_SCHEMA.Columns")
	   public List<Columns> selectAll();
	   
	   @Select("${sql}")
	   public List<Columns> selectBySql(@Param("sql") String sql);
	   
	   @Select("select * from INFORMATION_SCHEMA.Columns where 1=1 ${sql}")
	   public List<Columns> selectBySeachParam(@Param("sql") String sql,@Param("searchParam") Map<String, Object> searchParam,Page<Columns> page); 
	   
	   @Select("select * from INFORMATION_SCHEMA.Columns where 1=1 ${sql}")
	   public List<Columns> selectBySeachParam(@Param("sql") String sql,@Param("searchParam") Map<String, Object> searchParam);
}